
<!--
	user list !
-->
<h3>课程管理
    <small>课程管理</small>
</h3>
<div  ng-controller="coursesListCtrl" class="panel panel-default">
    <div class="panel-heading">
        <form class="form-inline">
            <div class="form-group">
                <input type="text" ng-keyup="dataEvent($event)" ng-model="search" class="form-control" placeholder="{{searchplaceholder}}">
                <label for="">{{statusSelect}} : </label>
                <select class="custom-css form-control"  ng-model="statusSelectValue" ng-change="dataChange()" ng-options="statusSelectValue._value_ for statusSelectValue in statusType" >
                </select>
                <label for="">课程平台 : </label>
                <select class="custom-css form-control"  ng-model="platSelectValue" ng-change="dataChange()" ng-options="platSelectValue._value_ for platSelectValue in platType" >
                </select>
                <label for="">课程分类 : </label>
                <select class="custom-css form-control"  ng-model="subjectSelectValue" ng-change="dataChange()" ng-options="subjectSelectValue._value_ for subjectSelectValue in subjectType" >
                </select>
                <label for="">课程标签 : </label>
                <select class="custom-css form-control center-block" ng-model="realmListSelectValue" ng-change="dataChange()" ng-options="realmListSelectValue.name  for realmListSelectValue in realmList"></select>
                </select>
            </div>
            <button type="button" ui-sref="cms.addCourses()" class="btn btn-labeled btn-success pull-right">
               	<span class="btn-label">
               		<i class="fa fa-plus"></i>
               	</span>添加课程
            </button>
        </form>
    </div>
    <div class="panel-body " ng-class="loading?'whirl standard':'' " style="border-top: 1px solid #CFDBE2;">
        <table class="table table-striped table-condensed">
            <thead>
            <tr>
                <th>课程编号</th>
                <th>课程标题</th>
                <th>老师名字</th>
                <th ng-show="heihei" ng-click="heihei=false" style="width:80px;background-color: #EDF1F2;color:#000;font-weight: 900">并 拢</th>
                <th ng-show="heihei">发布日期</th>
                <th ng-show="heihei">最后修改日期</th>

                <th ng-show="heihei">课程标签</th>
                <th ng-show="heihei">金额</th>
                <th ng-show="heihei">上新打标</th>
                <th ng-hide="heihei" ng-click="heihei=true" style="width:80px;background-color: #EDF1F2;color:#000;font-weight: 900">展 开</th>
                <th>订购量</th>
                <th>领取量</th>
                <th>评价数</th>
                <th>课程分类</th>
                <th>课程平台</th>
                <th>状态</th>
                <th>排序</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <!-- repeat begin -->
            <tr ng-repeat="resultItem in result ">
                <td>{{resultItem.productId}}</td>
                <td tooltip="{{resultItem.name}}">{{resultItem.name | limitToNum : 10}}</td>
                <td>{{resultItem.user.name}}</td>
                <th ng-show="heihei"></th>
                <td ng-show="heihei">{{resultItem.createtime.substring(0,10)}}</td>
                <td ng-show="heihei">{{resultItem.updatetime}}</td>
                <td ng-show="heihei">{{resultItem.classLabelOne|classLabelOne}}</td>
                <td ng-show="heihei">{{resultItem.price}}</td>
                <td ng-show="heihei">{{resultItem.isNew|isNew}}</td>
                <td ng-hide="heihei"></td>
                <td>{{resultItem.buyData}}</td>
                <td>{{resultItem.memberDate}}</td>
                <td>{{resultItem.evaluate}}</td>
                <td>{{resultItem.subject|subject}}</td>
                <td>{{resultItem.isApplet|isApplet}}</td>
                <td>{{resultItem.status | coursesType_status}}</td>
                <td>
                    <a tooltip="升序"  ng-disabled="$index==0&&turnPage.currentPage==1"  tooltip-trigger="mouseenter" class="btn btn-xs btn-danger" ng-click="fnSort(resultItem.productId,1)"><i class="fa fa-long-arrow-up"></i></a>
                    <a tooltip="降序" ng-disabled="dataLength==$index+(turnPage.currentPage-1)*10+1" tooltip-trigger="mouseenter" class="btn btn-xs btn-success" ng-click="fnSort(resultItem.productId,2)"><i class="fa fa-long-arrow-down"></i></a>
                </td>
                <td>
                    <a tooltip="详情" tooltip-trigger="mouseenter" class="btn btn-xs btn-primary" ui-sref="cms.coursesDetial({ productId : resultItem.productId})"><i class="fa fa-eye"></i></a>
                    <a tooltip="产品购买统计" tooltip-trigger="mouseenter" class="btn btn-xs btn-success" ui-sref="cms.productBuy({productId:resultItem.productId})"><i class="fa fa-glide"></i></a>
                    <a tooltip="学习时长/点击等统计" tooltip-trigger="mouseenter" class="btn btn-xs btn-danger" ui-sref="cms.studySituation({productId:resultItem.productId})"><i class="fa fa-user-times"></i></a>
                </td>
            </tr>
            <!-- repeat end -->
            </tbody>
        </table>
        <p style="display: inline-block; margin:21px 0;height: 30px;line-height: 30px;"> 显示 <strong>{{turnPage.totalItems}}</strong> 条中的 <strong>{{turnPage.itemsPerPage*(turnPage.currentPage-1)+1}}-{{ToNum}}</strong> 条</p>
        <pagination class="pull-right" first-text="{{turnPage.firstText}}" previous-text="{{turnPage.previousText}}" next-text="{{turnPage.nextText}}" last-text="{{turnPage.lastText}}" total-items="turnPage.totalItems" ng-model="turnPage.currentPage" max-size="turnPage.maxSize"
                    num-pages="numPages" boundary-links="true" ng-change="dataChange()" class="pagination-sm">
        </pagination>
    </div>
</div>